﻿using System;
using TestApplication.business.api;
using System.Threading;

namespace TestApplication.business.src
{
    class Brain : IBrain
    {
        private CaptureModel _captureModel;
        private IEyeWebcam _eyeWebcam;
        private Boolean _capturedImageChanged;
        private int _result;

        #region Properties

        public int Result
        {
            get { return _result; }
            set { _result = value; }
        }

        public IEyeWebcam EyeWebcam
        {
            get { return _eyeWebcam; }
            set { _eyeWebcam = value; }
        }

        public Boolean CapturedImageChanged
        {
            get { return _capturedImageChanged; }
            set { _capturedImageChanged = value; }
        }

        #endregion

        public Brain()
        {
            this._captureModel = CaptureModel.Instance;
        }


        public ThreadStart ThreadRun()
        {

            while (true)
            {
                //This is the normal sleep that relaxes the CPU a bit and lets other threads run fluently.
                Thread.Sleep(100);
            }
        }
    }
}